<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="author" content="wangbo">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    body {
      position: relative;
      background-image: url(./bg.jpeg);
      background-size: 100%;
    }

    div {
      width: 90px;
      height: 90px;
      position: absolute;
      border-radius: 50%;
      background-image: url(./xigua.jpg);
      background-size: 100%;
      background-repeat: no-repeat;
      overflow: hidden;
    }
  </style>
</head>

<body>
  <script>
    let div = document.querySelector("div")

    let body = document.querySelector("body")

    setInterval(() => {
      let l = Math.round(Math.random() * 1200)
      let t = Math.round(Math.random() * 800)
      let div = document.createElement("div")
      div.style.left = l + "px"
      div.style.top = t + "px"

      div.onclick = function () {
        div.style.backgroundImage = " url(./ban.jpg)"
        let i = 1
        setInterval(() => {
          div.style.top = i + "px"
          i = i + 5
        }, 50);
      }

      body.append(div)
    }, 1000);
  </script>
</body>

</html>